package com.tedu.weibo.config;


import com.tedu.weibo.interceptor.LoginInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class InterceptorConfig implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        System.out.println("走了");
       registry.addInterceptor(new LoginInterceptor()).addPathPatterns("/v1/weibo/insert","/v1/comment/insert");

    }
}
